/*
 * @Descripttion: 新西亚销售发货单接口
 * @version: V1.0
 * @Author: GaoWei
 * @Date: 2021-04-25 12:11:55
 * @LastEditors: GW
 * @LastEditTime: 2021-12-04 09:08:40
 */
import { axios } from '../../utils/request'

/**
 * 新西亚 销售发货单
 */
const api = {
    save: '/erp/nsInOutMain/save',
    examine: '/erp/nsInOutMain/examine',
    delete: '/erp/nsInOutMain/delete',
    getcode: '/erp/nsInOutMain/getCode',
    barcodeUrl: '/so/areaCalculation/analysisByBarCode',//条码解析

    submitUrl: '/so/deliveryMain/apply',
}
/**
 * 保存
 */
export function save (data) {
    return axios({
        url: api.save,
        method: "post",
        data: data
    })
}

/**
 * 审核
 */
export function examine (data) {
    return axios({
        url: api.examine,
        method: "get",
        params: data
    })
}

/**
 * 提交
 */
export function submitApi (data) {
    return axios({
        url: api.submitUrl,
        method: "get",
        params: data
    })
}

/**
 * 删除
 */
export function remove (data) {
    return axios({
        url: api.delete,
        method: "DELETE",
        params: data
    })
}

/**
 * 获取单据编号
 */
export function getCode (data) {
    return axios({
        url: api.getcode,
        method: "get",
        params: data
    })
}

//条码解析
export function analysisByBarCode (data) {
    return axios({
        url: api.barcodeUrl,
        method: "get",
        params: data
    })
}
